import Layout from '@/layout'

const contentRouter = {
  path: '/content',
  component: Layout,
  redirect: '',
  name: 'Content',
  meta: {
    title: '内容运营',
    icon: '内容运营'
  },
  children: [
    {
      path: 'knowledgeClassifyManagement',
      component: () => import('@/views/content/knowledgeClassify/index'),
      name: 'KnowledgeClassifyManagement',
      meta: { title: '知识库分类管理', icon: '课程分类管理' },
      children: [
        {
          path: 'knowledgeClassifyList',
          component: () => import('@/views/content/knowledgeClassify/knowledgeClassifyList'),
          name: 'KnowledgeClassifyList',
          meta: { title: '知识库分类管理', noCache: true }
        },
        {
          path: 'knowledgeClassifyEdit/:id',
          component: () => import('@/views/content/knowledgeClassify/knowledgeClassifyEdit'),
          name: 'KnowledgeClassifyEdit',
          meta: { title: '知识库分类编辑' },
          hidden: true
        },
        {
          path: 'knowledgeClassifyAdd',
          component: () => import('@/views/content/knowledgeClassify/knowledgeClassifyAdd'),
          name: 'KnowledgeClassifyAdd',
          meta: { title: '知识库分类新增' },
          hidden: true
        }
      ]
    },
    {
      path: 'knowledgeManagement',
      component: () => import('@/views/content/knowledge/index'),
      name: 'KnowledgeManagement',
      meta: { title: '知识库管理', icon: '知识库管理' },
      children: [
        {
          path: 'knowledgeList',
          component: () => import('@/views/content/knowledge/knowledgeList'),
          name: 'KnowledgeList',
          meta: { title: '知识库管理', noCache: true }
        },
        {
          path: 'knowledgeAdd',
          component: () => import('@/views/content/knowledge/knowledgeAdd'),
          name: 'KnowledgeAdd',
          meta: { title: '知识库添加', noCache: true },
          hidden: true
        },
        {
          path: 'knowledgeEdit/:id',
          component: () => import('@/views/content/knowledge/knowledgeEdit'),
          name: 'KnowledgeEdit',
          meta: { title: '知识库编辑' },
          hidden: true
        }
      ]
    }
  ]
}

export default contentRouter
